package com.zjweu.hkg.Servies;

import com.zjweu.hkg.DTO.ArticleViewHistoryDTO;
import com.zjweu.hkg.DTO.ArticleWithTagsDTO;
import com.zjweu.hkg.POJO.ArticleTags;
import com.zjweu.hkg.POJO.ArticleViewHistory;
import com.zjweu.hkg.POJO.Result;
import com.zjweu.hkg.POJO.Tag;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

@Service
public interface ArticleService {
    Result<Integer> addArticle(Map<String, Object> requestData);

    ResponseEntity<String> uploadArticleImage(MultipartFile file, String userName,String articleUUID);

    List<ArticleWithTagsDTO> getAllArticleWithTags();

    ArticleWithTagsDTO getArticleWithTagsByArticleId(int articleId,int uid);
    ArticleWithTagsDTO getArticleWithTagsByArticleId(int articleId);
    Result<String> addReadTimeByArticleId(ArticleWithTagsDTO articleWithTagsDTO);

    int addArticleViewHistory(int articleId, int userId);

     List<ArticleWithTagsDTO> getAllArticleWithTagsByUserId(int userId);

    Result<Integer> updateArticleWithTagsByArticleId(ArticleWithTagsDTO articleWithTagsDTO);

    Result<String> deleteArticleByArticleId(int articleId);

    List<ArticleViewHistoryDTO> findArticleViewHistoryByUserId(int userId);

    List<ArticleViewHistory> getArticleViewHistoryByUserId(int userId);

    List<ArticleTags> findArticleTagsByArticleId(int articleId);

    Tag findTagsByTagId(int tagId);

    List<ArticleWithTagsDTO> getArticlesByTags(List<String> recommendedTags);

    List<ArticleWithTagsDTO> likeSearchArticleByName(String articleTitle);

   List<ArticleWithTagsDTO> getFollowedArticles(int userId);
}
